package atomic;

import java.util.concurrent.atomic.AtomicInteger;

public class AtomicIntegerDemo {

    private static AtomicInteger i=new AtomicInteger(10);

    public static void main(String[] args) {

        boolean returnValue=i.compareAndSet(8,11);
        System.out.println(i.get());
        System.out.println(returnValue);
    }
}
